-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade go-msgpack to v2 #20173
Upgrade go-msgpack to v2 #20173
Conversation
Replaces #18812 Upgraded with: ``` find . -name '*.go' -exec sed -i s/"github.com\/hashicorp\/go-msgpack\/codec"/"github.com\/hashicorp\/go-msgpack\/v2\/codec/" '{}' ';' find . -name '*.go' -exec sed -i s/"github.com\/hashicorp\/net-rpc-msgpackrpc"/"github.com\/hashicorp\/net-rpc-msgpackrpc\/v2/" '{}' ';' go get ```
Commands: ``` go get -v -u github.com/hashicorp/raft-boltdb/v2 go get -v github.com/hashicorp/serf@5d32001edfaa18d1c010af65db707cdb38141e80 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything here looks good, but there still appears to be a reference to go-msgpack 1.1.5 in GNUmakefile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just to make sure I understand, we are going to go through the time encoding change due to setting
but this is okay, because the decoders on the other end in
if so LGTM |
Not quite. Nomad was already on msgpack-1.1.5, so we were already using the "New" time encoding.
This would not be upgrade safe, so not ok. If we had been on the msgpack-0.5.5 encoding then during upgrades the old agents would not understand times from new agents. Luckily we were on msgpack-1.1.5 before. |
Ah thanks, I understand now. I was curious how Nomad could have gotten to Whew, what a mess. |
Replaces #18812 Upgraded with: ``` find . -name '*.go' -exec sed -i s/"github.com\/hashicorp\/go-msgpack\/codec"/"github.com\/hashicorp\/go-msgpack\/v2\/codec/" '{}' ';' find . -name '*.go' -exec sed -i s/"github.com\/hashicorp\/net-rpc-msgpackrpc"/"github.com\/hashicorp\/net-rpc-msgpackrpc\/v2/" '{}' ';' go get go get -v -u github.com/hashicorp/raft-boltdb/v2 go get -v github.com/hashicorp/serf@5d32001edfaa18d1c010af65db707cdb38141e80 ``` see https://github.com/hashicorp/go-msgpack/releases/tag/v2.1.0 for details
Upgraded to go-msgpack v2. Replaces #18812 because I'm better at writing new PRs than I am at resolving merge conflicts.
Manually tested with a set of 3 servers at different versions: this PR, 1.7.6, and 1.6.9. Ran a job on a 1.5.2 client agent just to really try and keep things wacky. Didn't notice anything unusual.
Please peek at
go.mod
and 772d35f in particular. Everything else is mechanically changed. See the commit messages on d467ab5 and 7e353e0 if you want to mock my ham fisted import rewriting.